import Vue from 'vue'
import Vuex from 'vuex'

import state from './state'
import mutations from './mutations'
import actions from './actions'
import getters from './getters'

import template1 from './modules/template1'
import template2 from './modules/template2'

Vue.use(Vuex)

const Store = new Vuex.Store({
  // store.state.template1 // -> template1 的状态
  // store.state.template2 // -> template2 的状态
  modules: {
    template1,
    template2
  },
  state,
  mutations,
  actions,
  getters
})

export default Store
